<#include "../header.ftl">
<link href="${TEMPLATE_PATH}/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user_reg.css" rel="stylesheet" type="text/css" />
<script>
function showErrors(id,errors){
	for(var name in errors){
		$.fn.tips({type:"error",content:errors[name]});
		var ele=$("input[name='"+name+"']");
		id.validator('showMsg', ele, {
		    type: "error",
		    msg: errors[name]
		});
	}
}
$(function(){
	
	$(".form_reg").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"/user/userInfo.json",
				type:"post",
				dataType:"json",
				data:$(form).serialize(),
				success:function(data){
					var type="warn";
					if(data.result==true){type="ok";}
					if(data.result==true)
					{
						$.fn.tips({type:type,content:data.msg});
					}else{
						showErrors($('.form_reg'),data.errors);
					}
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					$.fn.tips({type:"error",content:XMLHttpRequest.responseText});
				}
			});
		}
	});
	$("#user_menu_13").addClass("hover");
})
</script>
 <div id="position">您所在的位置：<a href="/">首页</a> > <a href="/user/">会员中心</a></div>
    <div class="w980 mt10 mc">
    <#include "userLeft.ftl">
     <div class="right_big">
            <div class="b">
                <div class="subject">用户信息</div>
                <div class="p35">
                <form class="form_reg" method="post">
                <ul id="reg">
                    <li><em>用户名：</em><span><#if SESSION_USER.userName??>${SESSION_USER.userName}</#if></span></li>
                    <li><em>姓名：</em><input type="text" name="userEntity.userRealName" id="userRealName" value="<#if userEntity.userRealName??>${userEntity.userRealName}</#if>" class="ip w01" data-rule="姓名:required;nickname;chinese;" /></li>
                    <li><em>提现银行：</em><input type="text" name="userEntity.bankName" value="<#if userEntity.bankName??>${userEntity.bankName}</#if>" class="ip w01" data-rule="提现银行:required;" /></li>
                    <li><em>提现银行卡卡号：</em><input type="text" name="userEntity.bankCard" value="<#if userEntity.bankCard??>${userEntity.bankCard}</#if>" class="ip w01" data-rule="提现银行卡卡号:required;" /></li>
                    <li><em>证件号：</em><input type="text" name="userEntity.vertifyCard" value="<#if userEntity.vertifyCard??>${userEntity.vertifyCard}</#if>" class="ip w01" maxlength="18" data-rule="证件号:ID_card;" /></li>
                    <li><em>手机号：</em><input type="text" name="userEntity.phoneNum" maxlength="11" value="<#if userEntity.phoneNum??>${userEntity.phoneNum}</#if>" class="ip w01" data-rule="手机号:mobile;" /></li>
                    <li><em>交易密码：</em><input type="password" name="userEntity.chargePassWord" class="ip w01 c_password" data-rule="密码:required;password;" maxlength="16" /><span>默认为登录密码</span></li>
                    
                    <dd><input type="submit" value="提交修改" class="bnt_blue" /></dd>
                </ul>
                </form>
                </div>
            </div>
        </div>
    </div>
</div>
    
<#include "../footer.ftl">